Current Location: Home> Function Categories> gettimeofday

gettimeofday

Get the current time (minutes, seconds, microseconds)
Name:gettimeofday
Category:Date and time
Programming Language:php
One-line Description:Return to the current time.

Definition and usage

gettimeofday() function returns the current time.

Example

Return to the current time:

 <?php
// Output the array returned by gettimeofday()
print_r ( gettimeofday ( ) ) ;

// Output the floating point number returned by gettimeofday()
echo gettimeofday ( true ) ;
?>

Try it yourself

grammar

 gettimeofday ( return_float ) ;
parameter describe
return_float Optional. When set to TRUE, a floating point number is returned, not an array. The default is FALSE.
Similar Functions
Popular Articles